<?php
/**
 * MySQL Connector
 *
 * Provide a easy and powerful interface to connect to mysql databases host ,
 * manipulate information in standard layer through standard functions and
 * enabling a query function to complex string queries.
 *
 * @category  database
 * @package   CORE-database
 * @author    Juan Manuel Lemus <juan.lemus@apperture.org>
 * @copyright (c) 2008 by Apperture, Inc 
 * @license   http://www.apperture.org/es/licenses/apperture/gnugpl-3.0
 * @version   CVS: $Id: mysql.php,v 0.010 2008/03/05 09:02:00 cellog Exp $
 * @link      http://download.apperture.org/multi-purpose/database/database.tar.gz
 **/

/**#@+
 * Runtime constants
 */
define("DD_CONNECTOR"        , "mysql");
define("DB_CONNECTOR_VERSION", "0.010");

/**#@+
 * Query base strings
 **/
define("MYSQL_USE_DB", "USE %database%");

class mysql
{
    // {{{ properties
    
    /**
     * Host Name (default: localhost)
     *
     * @var    string
     * @access private
     * @since  0.010
     **/
    private $_hostname = "localhost";
    
    /**
     * ID Database Host Connection
     *
     * @var    resource
     * @access private
     * @since  0.010
     **/
    private $_idhost;
    
    /**
     * User password
     *
     * @var    string
     * @access private
     * @since  0.010
     **/
    private $_password;
    
    /**
     * Username
     *
     * @var    string
     * @access private
     * @since  0.010
     **/
    private $_username;
    
    // }}}
    
    // {{{ private functions
    
    // {{{ public functions
    
    /**
     * Connect to Database Host
     *
     * @param  string : host name
     * @param  string : username
     * @param  string : password
     * @access public
     * @since  0.010
     **/
    function connect($hostname, $username, $password)
    {
        return ($this->_idhost = @mysql_connect($hostname, $username, $password) );
    }
    
    
}
?>